//
//  sizes.h
//  Yingka
//
//  Created by it on 7/15/19.
//  Copyright © 2019 it. All rights reserved.
//

#ifndef sizes_h
#define sizes_h

#define ScreenWidth [UIScreen mainScreen].bounds.size.width

#define ScreenHeight [UIScreen mainScreen].bounds.size.height

#define HasBottomBar ((ScreenHeight >= 812.0) && [[UIDevice currentDevice].model isEqualToString:@"iPhone"])

#define StatusBarHeight [UIApplication sharedApplication].statusBarFrame.size.height

#define SafeAreaTopHeight ((ScreenHeight >= 812.0) && [[UIDevice currentDevice].model isEqualToString:@"iPhone"] ? 88 : 64)

#define ScreenFrame [UIScreen mainScreen].bounds


////////////////////////////////////----iPhone X----////////////////////////////////////

//iPhoneX / iPhoneXS
#define  IS_IphoneX_XS     (ScreenWidth == 375.f && ScreenHeight == 812.f ? YES : NO)
//iPhoneXR / iPhoneXSMax
#define  IS_IphoneXR_XSMax    (ScreenWidth == 414.f && ScreenHeight == 896.f ? YES : NO)

// IPhoneX 系列的手机
#define iPhoneX (IS_IphoneX_XS || IS_IphoneXR_XSMax)

#define TabbarHeight (iPhoneX ? (49.f+34.f) : 49.f)

#define NavigateonHeight  (iPhoneX ? 88.0 : 64.0)

#define SafeBottomMargin (iPhoneX ? 34.f : 0.f)

#define SafeTopMargin (iPhoneX ? 44.f : 0.f)

#endif /* sizes_h */
